package casino;

import java.io.IOException;
import java.net.InetAddress;

public class LANTester extends Thread {
	private MenuList list;
	
	public LANTester(MenuList l){
		super();
		list = l;
	}
	
	public void run(){
		for(int i = 1; i < 254; i++){
			String host = "192.168.1."+i;
			try {
				if(InetAddress.getByName(host).isReachable(50)){
					list.add(host);
				}
			}catch (IOException e) {}
		}
	}
	
	public <E> void out(E o){
		System.out.println(o.toString());
	}
}
